function checkLogin(){
	var params = $('#loginform').getFormParams();
	params += '&' + getEncodedParams({'T':'ADMIN', 'A':'CHECKLOGIN'});
	
	$.ajax({
		url: indexUrl,
		type: 'POST',
		dataType: 'json',
		data: params,
		success: function(response){
			if (response.SUCCESS == 1)
				document.location.href = indexUrl + '?' + getEncodedParams({'T':'ADMIN'});
			else
				$('span[class=errormsg]').html('Login fehlgeschlagen!');
		}
	});
}